<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
<script>

	class p {
	    constructor(a) {
	        this.a = a
	    }

	    geta() {
	        return this.a
	    }

	    seta(a){
	        this.a.a = a
	    }
	}
	let ob = {a : 'a'};
	let t = new p(ob);
	t.seta('b');
	console.log(ob.a);//b

	function Test(a) {
	    this.a = a;

    }

    let obj ={
	    o: 'test'
    };

    let b = new Test(obj);
    let obj2 = b.a;
    console.log('obj2:', obj2);
    obj2.o = '1';
    console.log('obj', obj)
</script>
</body>
</html>